package eg.backend.repository;

import java.util.List;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import eg.backend.domain.GlobalTag;
import eg.backend.domain.Tag;
import eg.backend.domain.fly.TagCount;

@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public interface TagRepository extends TagInfoRepository<Tag> {
	GlobalTag getGlobalTag(String name);
	
	List<TagCount> findUsedTags(String owner);
	List<String> findByNameAndOwner(String name, String owner);
	List<String> findNotUsedByNameAndOwner(String name, String owner);
	List<String> findAllGlobalTagNames();
}